<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="/inc/sessionCheck.jsp" %>
<%@ taglib uri="http://ssh.org/selects" prefix="ssh"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://displaytag.sf.net/el" prefix="display"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>通知公告列表</title>
<link href="../css/zfcl.css" rel="stylesheet" type="text/css" />
<link href="../css/main_div.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="../js/main.js"></script>
<script language="javascript" src="../js/calendar/WdatePicker.js"></script>
		<link rel="stylesheet" type="text/css" href="css/screen.css" />
		<script type="text/javascript" src="./js/check.js"></script>
</head>

<body>
	<div>
			<html:link action="toAddUser.do?method=toAddUser" title="添加用户">添加用户</html:link>
			<html:link action="toAddUser.do?method=toAddUser" title="删除所选用户"
				onclick="return selectAll('true','userId');">删除用户</html:link>
			<html:link action="statisticsUser.do?method=statisticsUser" title="生成汇总表">生成汇总表</html:link>
			<display:table name="userList" class="simple" id="tuser" pagesize="10"  partialList="true"
				defaultsort="1" defaultorder="descending" size="resultSize" 
				requestURI="listUser.do?method=getUsers"> 
				<display:column
					title="<button onClick='checkAll(\"userId\");'>全选</button>
						   <button onClick='cancelCheck(\"userId\");'>反选</button>">
					<input type="checkbox" name="userId" value="${tuser.checked}" />
				</display:column>
				<display:column property="userId" title="用户ID" sortable="true"
					headerClass="sortable" />
				<display:column property="userName" title="用户名" sortable="true"
					headerClass="sortable" />
				<display:column property="userPwd" title="用户密码" style=""
					maxLength="5" sortable="true" headerClass="sortable" />
				<display:column property="userSex" title="用户性别" sortable="true"
					headerClass="sortable" decorator="com.sync.commons.displayColumnDecorator" />
				<display:column property="userAge" title="用户年龄" sortable="true"
					headerClass="sortable" />
				<display:column title="操作">
					<c:url var="url" scope="page" value="toUpdateUser.do">
						<c:param name="userId" value="${tuser.userId}" />
						<c:param name="method" value="toUpdateUser" />
					</c:url>
					<html:link action="${url}">更新</html:link>
					<c:url var="url" scope="page" value="deleteUser.do">
						<c:param name="userId" value="${tuser.userId}" />
						<c:param name="method" value="deleteUser" />
					</c:url>
					<html:link action="${url}">删除</html:link>
				</display:column>
			</display:table>
		</div>
</body>
</html>